package db

import (
	"gitee.com/alex_li/amazon-rpt/internal/tool"
	"github.com/lishimeng/app-starter"
	"time"
)

type Application struct {
	app.Pk
	Code string  `orm:"column(code)"`
	Name string  `orm:"column(name)"`
	Desc string  `orm:"column(desc)"`
	Cost float64 `orm:"column(cost)"`
	app.TableChangeInfo
}

func (app *Application) GenCode() {
	now := time.Now().String()
	app.Code = tool.GenMd5Code([]byte(now))
	return
}
